package com.jeesite.modules.jydq.entity;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 比价规则表Entity
 * @author dong
 * @version 2025-03-20
 */
@Table(name="jydq_comparison_rule", alias="a", label="比价规则表信息", columns={
		@Column(name="id", attrName="id", label="编号", isPK=true),
		@Column(name="name", attrName="name", label="规则名称", queryType=QueryType.LIKE),
		@Column(name="algorithm", attrName="algorithm", label="算法描述"),
		@Column(name="create_by", attrName="createBy", label="创建者", isUpdate=false, isQuery=false),
		@Column(name="create_date", attrName="createDate", label="创建时间", isUpdate=false, isQuery=false),
		@Column(name="update_by", attrName="updateBy", label="更新者", isQuery=false),
		@Column(name="update_date", attrName="updateDate", label="更新时间", isQuery=false),
		@Column(name="remarks", attrName="remarks", label="备注", queryType=QueryType.LIKE),
	}, orderBy="a.update_date DESC"
)
public class JydqComparisonRule extends DataEntity<JydqComparisonRule> {
	
	private static final long serialVersionUID = 1L;
	private String name;		// 规则名称
	private String algorithm;		// 算法描述

	public JydqComparisonRule() {
		this(null);
	}
	
	public JydqComparisonRule(String id){
		super(id);
	}
	
	@NotBlank(message="规则名称不能为空")
	@Size(min=0, max=128, message="规则名称长度不能超过 128 个字符")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@NotBlank(message="算法描述不能为空")
	public String getAlgorithm() {
		return algorithm;
	}

	public void setAlgorithm(String algorithm) {
		this.algorithm = algorithm;
	}
	
}